# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-dbd-sybase
pkgver=1.23
pkgrel=1
pkgdesc="Sybase Driver for DBI"
arch=('loong64' 'x86_64')
url="https://search.cpan.org/dist/DBD-Sybase/"
license=('GPL' 'PerlArtistic')
depends=('perl-dbi>=1.52' 'perl' 'freetds')
options=('!emptydirs')
source=("https://search.cpan.org/CPAN/authors/id/M/ME/MEWP/DBD-Sybase-${pkgver}.tar.gz")
sha256sums=('0757ba6aac9a29a2dc385995d66c8f412a88968fd236c0d8bb4659028e4e9965')

build() {
  cd  "$srcdir"/DBD-Sybase-${pkgver}
  export SYBASE=/usr
  echo -e "\n\n\n\n\n\n" | PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "$srcdir"/DBD-Sybase-${pkgver}
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
